Currently, VARCHAR
and VARCHAR2
are identical data types. But to prevent future changes in behavior, Oracle recommends
the use of VARCHAR2
.
Noncompliant code example
DECLARE
var VARCHAR(42); -- Noncompliant
BEGIN
NULL;
END;
/
Compliant solution
DECLARE
var VARCHAR2(42); -- Compliant
BEGIN
NULL;
END;
/